Local variable debug info deduplication#222
Conversation
|
@jiel-nv Many thanks for the PR! I'll add it to my queue to review, but note I'm OOO until next Tuesday, so will have to pick it up after then. |
| and ( | ||
| name not in self._singly_assigned_vars | ||
| or self._disable_sroa_like_opt | ||
| ) | ||
| and not name.startswith("$") |
There was a problem hiding this comment.
If I comment out all these checks then none of the debuginfo tests fail. It's not immediately obvious to me what these conditions are for (I was commenting them out to try to learn what they did by what breaks when I do that) - are they really needed? If so, what for? Are there additional tests needed to check for the conditions these handle?
There was a problem hiding this comment.
Ah, I see now that the first two conditions are used in the superclass storevar() and suppresses storing the variable when they are true.
I think the last is because we don't emit debuginfo for internal names (those beginning with a $).
gmarkall
left a comment
There was a problem hiding this comment.
I think this generally looks good - there is one suggestion on the diff which I think will save time for future readers of the code (it took me quite a while to work out).
Adding comments explaining the conditions. Co-authored-by: Graham Markall <535640+gmarkall@users.noreply.github.com>
- Local variable debug info deduplication (NVIDIA#222) - Fix package installation for wheels CI (NVIDIA#238) - Fix Invalid NVVM IR emitted when lowering shfl_sync APIs (NVIDIA#231) - Add Bfloat16 Low++ Bindings (NVIDIA#166) - Fix cuda.jit decorator inline (NVIDIA#181) - Feature: cuda specific make_attribute_wrapper (NVIDIA#193) - return a none tuple if no libdevice path is found (NVIDIA#234)
- Local variable debug info deduplication (#222) - Fix package installation for wheels CI (#238) - Fix Invalid NVVM IR emitted when lowering shfl_sync APIs (#231) - Add Bfloat16 Low++ Bindings (#166) - Fix cuda.jit decorator inline (#181) - Feature: cuda specific make_attribute_wrapper (#193) - return a none tuple if no libdevice path is found (#234)
This PR improves the debug info for local variables.
Fixes nvbug#5027648, nvbug#5009771, nvbug#5120628.